package view.tip
{
	import data.ArmsProp;
	import data.BulletProp;
	
	import manager.ObjDataManage;
	
	public class ArmsTip extends BaseTip
	{
		public function ArmsTip()
		{
			super();
		}
		
		public function show(type:String):void{
		    var ap:ArmsProp = ObjDataManage.getInstance().getTankProp(type);

			var html:String='';
			
			if(ap.hasOwnProperty('nameDes'))html+="			"+"<font color='#ff9933'>【 </font>" + "<font color='#ff9933'>"+ap['nameDes']+"</font>" +"<font color='#ff9933'> 】</font>"+"\n";
			if(ap.hasOwnProperty('revive'))html+=	"<font color='#CFF1F2'>激活能量：  </font>"+ap['revive']+"\n";
			if(ap.hasOwnProperty('blood'))html+=	"<font color='#CFF1F2'>       血量：  </font>"+ap['blood']+"\n";
			if(ap.hasOwnProperty('shoutRadius'))html+=	"<font color='#CFF1F2'>射击半径：</font>"+ap['shoutRadius']+"\n";
			if(ap.hasOwnProperty('shoutGap'))html+=	"<font color='#CFF1F2'>射击频率：</font>"+'每分钟'+int(60000/ap['shoutGap'])+"发"+"\n" ;
			if(ap.hasOwnProperty('bulletType')){
				html+=	"<font color='#CFF1F2'>炮弹类型：</font>"+ap['bulletType']+"型";
				var bp:BulletProp = ObjDataManage.getInstance().getBulletProp(ap['bulletType']);
				html+='(杀伤力：'+bp.art+")\n" 
			}
			if(ap.hasOwnProperty('rotateSpeed'))html+=	"<font color='#CFF1F2'>转弯速度：</font>"+ap['rotateSpeed']+"\n";
			if(ap.hasOwnProperty('operation'))html+=	"<font color='#CFF1F2'>使用方法：</font>"+ap['operation']+"\n";
			if(ap.hasOwnProperty('b_num'))html+=	"<font color='#CFF1F2'>    载弹量：</font>"+ap['b_num']+"\n";
			if(ap.hasOwnProperty('killSelfRat'))html+=	"<font color='#CFF1F2'>自杀攻击：</font>"+ap['killSelfRat']+"%\n";
			txt.htmlText = html;
			sprite.width = txt.width;
			sprite.height = txt.height;
		}
		
	}
}